<template>
  <footer class="app-footer">
    <!-- 雷切特效背景 -->
    <div class="chidori-bg"></div>
    
    <!-- 卡卡西雷切特效元素 - 覆盖整个页脚 -->
    <div class="lightning-grid">
      <div class="lightning-line line1"></div>
      <div class="lightning-line line2"></div>
      <div class="lightning-line line3"></div>
      <div class="lightning-line line4"></div>
      <div class="lightning-line line5"></div>
      <div class="lightning-line line6"></div>
    </div>
    
    <!-- 雷切能量球 -->
    <div class="chidori-container left">
      <div class="chidori-orb"></div>
      <div class="chidori-sparks">
        <div class="spark spark-1"></div>
        <div class="spark spark-2"></div>
        <div class="spark spark-3"></div>
        <div class="spark spark-4"></div>
      </div>
    </div>
    
    <div class="chidori-container right">
      <div class="chidori-orb"></div>
      <div class="chidori-sparks">
        <div class="spark spark-1"></div>
        <div class="spark spark-2"></div>
        <div class="spark spark-3"></div>
        <div class="spark spark-4"></div>
      </div>
    </div>
    
    <!-- 横向电流 -->
    <div class="horizontal-lightning left"></div>
    <div class="horizontal-lightning right"></div>
    
    <div class="footer-content">
      <div class="footer-text">
        <div class="copyright glow-text">
          Copyright © 曾老湿 2025
        </div>
        <div class="icp-info">
          <a href="https://beian.miit.gov.cn/" target="_blank" class="icp-link">
            京ICP备18053124号-1
          </a>
        </div>
      </div>
    </div>
  </footer>
</template>

<script setup lang="ts">
// Vue 3 Composition API - no need for explicit export
</script>

<style lang="scss" scoped>
.app-footer {
  position: fixed; /* 固定在底部 */
  width: 100%;
  background-color: rgba(7, 15, 35, 0.9);
  border-top: 1px solid rgba(61, 199, 255, 0.4);
  padding: 8px 15px; /* 减少上下padding */
  color: rgba(230, 230, 230, 0.8);
  font-size: 12px; /* 减小字体 */
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.2), 0 0 15px rgba(61, 199, 255, 0.3);
  bottom: 0; /* 固定在底部 */
  left: 0;
  overflow: hidden; /* 确保特效不会溢出 */
  min-height: 40px; /* 减少最小高度 */
  z-index: 900; /* 确保在大多数内容之上 */
}

.chidori-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 15% 50%, rgba(61, 199, 255, 0.2) 0%, transparent 40%),
    radial-gradient(circle at 85% 50%, rgba(61, 199, 255, 0.2) 0%, transparent 40%),
    linear-gradient(to right, rgba(7, 15, 35, 0.9), rgba(10, 30, 60, 0.7), rgba(7, 15, 35, 0.9));
  z-index: 0;
  animation: bg-pulse 3s infinite alternate;
}

/* 雷切电网格效果 */
.lightning-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.lightning-line {
  position: absolute;
  width: 100%;
  height: 1px;
  background: linear-gradient(to right,
    transparent 0%,
    rgba(61, 199, 255, 0.2) 10%,
    rgba(61, 199, 255, 0.8) 20%,
    rgba(255, 255, 255, 0.9) 30%,
    rgba(61, 199, 255, 0.8) 40%,
    rgba(61, 199, 255, 0.2) 50%,
    transparent 60%,
    rgba(61, 199, 255, 0.2) 70%,
    rgba(61, 199, 255, 0.8) 80%,
    rgba(255, 255, 255, 0.9) 90%,
    rgba(61, 199, 255, 0.2) 100%
  );
  opacity: 0;
  box-shadow: 0 0 8px 1px rgba(61, 199, 255, 0.8);
}

.line1 {
  top: 0;
  animation: lightning-move 5s infinite 0.2s;
}

.line2 {
  top: 20%;
  animation: lightning-move 5s infinite 1s;
}

.line3 {
  top: 40%;
  animation: lightning-move 5s infinite 2.1s;
}

.line4 {
  top: 60%;
  animation: lightning-move 5s infinite 0.7s;
}

.line5 {
  top: 80%;
  animation: lightning-move 5s infinite 1.7s;
}

.line6 {
  top: 100%;
  animation: lightning-move 5s infinite 0.5s;
}

/* 横向电流效果 */
.horizontal-lightning {
  position: absolute;
  height: 100%;
  width: 40%;
  top: 0;
  z-index: 1;
  background: repeating-linear-gradient(
    90deg,
    transparent,
    rgba(61, 199, 255, 0.1) 1px,
    transparent 2px,
    transparent 10px
  );
  animation: horizontal-flash 4s infinite;
}

.horizontal-lightning.left {
  left: 0;
  animation-delay: 0.5s;
}

.horizontal-lightning.right {
  right: 0;
  animation-delay: 0.8s;
}

/* 雷切能量球 */
.chidori-container {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; /* 减小尺寸 */
  height: 30px; /* 减小尺寸 */
  z-index: 2;
  pointer-events: none;
}

.chidori-container.left {
  left: 15%;
}

.chidori-container.right {
  right: 15%; 
}

.chidori-orb {
  position: absolute;
  width: 30px; /* 减小尺寸 */
  height: 30px; /* 减小尺寸 */
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.9) 0%, rgba(61, 199, 255, 0.8) 40%, rgba(0, 145, 255, 0.4) 70%, transparent 100%);
  box-shadow:
    0 0 10px 3px rgba(61, 199, 255, 0.7), /* 减小阴影 */
    0 0 20px 6px rgba(61, 199, 255, 0.4),
    0 0 30px 10px rgba(61, 199, 255, 0.2);
  animation: chidori-pulse 2s infinite;
  z-index: 2;
}

.chidori-sparks {
  position: absolute;
  width: 60px; /* 减小尺寸 */
  height: 60px; /* 减小尺寸 */
  z-index: 1;
}

.spark {
  position: absolute;
  top: 50%;
  left: 50%;
  background-color: rgba(255, 255, 255, 0.8);
  transform-origin: center;
  height: 2px;
  width: 20px;
  border-radius: 2px;
  box-shadow: 0 0 8px 2px rgba(61, 199, 255, 0.8);
}

.spark-1 {
  transform: translate(-50%, -50%) rotate(0deg);
  animation: spark-anim 3s infinite 0.1s, spark-move 4s infinite;
}

.spark-2 {
  transform: translate(-50%, -50%) rotate(45deg);
  animation: spark-anim 3s infinite 0.3s, spark-move 4s infinite 0.5s;
}

.spark-3 {
  transform: translate(-50%, -50%) rotate(90deg);
  animation: spark-anim 3s infinite 0.5s, spark-move 4s infinite 1s;
}

.spark-4 {
  transform: translate(-50%, -50%) rotate(135deg);
  animation: spark-anim 3s infinite 0.7s, spark-move 4s infinite 1.5s;
}

.footer-content {
  position: relative;
  z-index: 5; /* 确保内容在特效上方 */
  display: flex;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-text {
  text-align: center;
  text-shadow: 0 0 10px rgba(61, 199, 255, 0.7);
}

.copyright {
  opacity: 0.9;
  margin-bottom: 4px; /* 减少间距 */
}

.glow-text {
  text-shadow: 0 0 5px rgba(61, 199, 255, 0.7);
  animation: text-flicker 5s infinite;
}

.icp-link {
  color: rgba(230, 230, 230, 0.8);
  text-decoration: none;
  
  &:hover {
    color: #3dc7ff;
    text-decoration: underline;
    text-shadow: 0 0 8px rgba(61, 199, 255, 0.8);
  }
}

/* 动画定义 */
@keyframes chidori-pulse {
  0%, 100% {
    opacity: 0.7;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

@keyframes spark-anim {
  0%, 100% {
    width: 15px;
    opacity: 0.7;
  }
  25% {
    width: 25px;
    opacity: 1;
  }
  50% {
    width: 20px;
    opacity: 0.8;
  }
  75% {
    width: 30px;
    opacity: 1;
  }
}

@keyframes spark-move {
  0%, 100% {
    box-shadow: 0 0 8px 2px rgba(61, 199, 255, 0.8);
  }
  50% {
    box-shadow: 0 0 15px 4px rgba(61, 199, 255, 1);
  }
}

@keyframes lightning-move {
  0%, 100% {
    opacity: 0;
    transform: translateX(100%);
  }
  5%, 15% {
    opacity: 0.8;
  }
  50% {
    opacity: 0;
    transform: translateX(-100%);
  }
}

@keyframes horizontal-flash {
  0%, 100% {
    opacity: 0.1;
    background-position: 0 0;
  }
  50% {
    opacity: 0.4;
    background-position: 100% 0;
  }
}

@keyframes bg-pulse {
  0%, 100% {
    opacity: 0.8;
  }
  50% {
    opacity: 1;
  }
}

@keyframes text-flicker {
  0%, 100% {
    text-shadow: 0 0 5px rgba(61, 199, 255, 0.7);
  }
  10% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(61, 199, 255, 0.8);
  }
  20% {
    text-shadow: 0 0 5px rgba(61, 199, 255, 0.7);
  }
  30% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(61, 199, 255, 0.8);
  }
  40% {
    text-shadow: 0 0 5px rgba(61, 199, 255, 0.7);
  }
  70% {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9), 0 0 20px rgba(61, 199, 255, 0.8);
  }
  80% {
    text-shadow: 0 0 5px rgba(61, 199, 255, 0.7);
  }
}
</style> 